package top.xia17.plugins.fast.dynamic.datasource.dao;

import top.xia17.plugins.fast.common.database.jpa.extension.Xia17JpaRepository;

import java.util.Optional;

/**
 * @author xia17
 * @date 2022/4/13
 */
public interface DatasourceRepository extends Xia17JpaRepository<DatasourceEntity, Long> {


    /**
     * 查询启用的数据源信息
     *
     * @param engName /
     * @return /
     */
    Optional<DatasourceEntity> findByEngName(String engName);

    /**
     * 查询
     *
     * @param engName /
     * @return /
     */
    int countAllByEngName(String engName);
}
